import request from './request'

// 获取所有站点
export function getAllVNode() {
  return new Promise((resolve, rejected) => {
    request({
      url: '/ques4/getAllVNode',
      method: 'get'
    }).then(res => {
      resolve(res);
    });
  });
}
// 获取所有站点之间的边
export function getAllEdges() {
  return new Promise((resolve, rejected) => {
    request({
      url: '/ques4/getAllEdges',
      method: 'get'
    }).then(res => resolve(res));
  });
}

// 获取起点到终点所有路径
export function getAllPaths(startId,endId) {
  return new Promise((resolve, rejected) => {
    request({
      url: '/ques4/findPaths',
      method: 'post',
      params: {startId, endId}
    }).then(res => resolve(res));
  });
}
